1. Field of the Invention
The present invention relates to an apparatus for detecting a moving object in a motion picture sequence, and is directed more particularly to an apparatus for extracting a moving object from, for example, a color video image.
2. Description of the Prior Art
Apparatus for detecting moving objects has been used, for example, to extract a picture of a live heart from a color video image of a living organism.
A particular method for detecting a moving object from such a color video image, has been proposed in Japanese Laid-Open Patent Application No. 62-118480. According to this disclosure, a background image is formed in a pre-determined manner, and this background image is compared with a current image, whereby a difference image having a deviation larger than a pre-determined threshold value is extracted to provide an image of a moving object.
FIG. 1 shows a functional block diagram of an image processing apparatus which detects a moving object by utilizing such a background image according to the prior art.
Referring to FIG. 1, a video camera 1 generates a color video signal corresponding to the n'th frame of an original image sequence. This color video signal is passed through an analog-to-digital (A/D) converter 2 and a video signal processing circuit (not shown), in which it is converted and processed to provide three digital red, green and blue (R, G, B) primary color video signals x.sub.n.sup.R, x.sub.n.sup.G and x.sub.n.sup.B. These video signals x.sub.n.sup.R, x.sub.n.sup.G and x.sub.n.sup.B are written to a video image memory 3 at predetermined locations. The video image memory 3 is formed by a frame buffer that can store the 8-bit RGB video signal representing an original image made up of, for example, 768 (horizontal).times.512 (vertical) pixels. These RGB video signals x.sub.n.sup.R, x.sub.n.sup.G and x.sub.n.sup.B will hereinafter be referred to as a color video signal x.sub.n for simplicity.
The color video signal x.sub.n is read out from the video image memory 3 and input to a subtracting input terminal of an accumulator circuit 4 and to a subtracting input terminal of an extractor circuit 5.
A video image memory 6 having a storage capacity identical to that of the video image memory 3 is also provided for processing the background image. To this video image memory 6, are written RGB video signals y.sub.n.sup.R, y.sub.n.sup.G and y.sub.n.sup.B representing the n'th frame of a background image. These RGB video signals y.sub.n.sup.R, y.sub.n.sup.G and y.sub.n.sup.B will hereinafter be simply referred to as a color video signal yn. A color video signal of the immediately preceding frame, i.e., a color video signal y.sub.n-1 representing the (n-1)'th frame read out from the video image memory 6 is input to an adding input terminal of the accumulator circuit 4 and an adding input terminal of the extractor circuit 5.
The accumulator circuit 4 generates a video signal y.sub.n representing the n'th frame of the background image from the video signal x.sub.n of the n'th frame of the current original image and the video signal y.sub.n-1 of (n-1)'th frame of background image from the preceding frame by means of the following equation ##EQU1##
In equation (1) above, c represents a constant of approximately one least significant bit (1 LSB). The video signal y.sub.n generated by the accumulator circuit 4 on the basis of the equation (1) is input to the video image memory 6, to which it is written as the n'th frame of the video signal of the background image. Accordingly, regardless of sudden changes in the original image, the background image is gradually changed by about 1 LSB each frame. Therefore, it is to be appreciated that the background image is generated by removing the moving object from the original image.
Furthermore, the extractor circuit 5 generates an n'th frame motion picture video signal zn (z.sub.n.sup.R, z.sub.n.sup.G and z.sub.n.sup.B) from the (n-1)'th background image video signal y.sub.n-1 and the n'th frame original image picture video signal x.sub.n by means of the following equations. ##EQU2## where .delta..sup.R, .delta..sup.G, and .delta..sup.B represent threshold values determined with respect to the three primary color signals R, G and B, respectively, and d.sup.R, d.sup.G and d.sup.B are constants, respectively.
More specifically, an image area in which the difference between the background image and the current image exceeds a predetermined threshold value with respect to any one of the three primary color signals R, G and B is identified as a moving image and an current image thereof is extracted, whereas other portions are replaced with a pre-determined color (e.g., black, raster pattern or the like).
The thus generated video signal z.sub.n representing the moving image is written to a moving image video image memory 7, and the video signal z.sub.n is read out from this video image memory 7 and passed through a digital-to-analog (D/A) converter 8 to a color display monitor 9. Consequently, the color display monitor 9 displays the moving image on a background of the pre-determined color.
According to the example of the prior art shown in FIG. 1, if an original picture sequence is provided wherein, as shown in FIG. 2A, a toy train 10 constitutes a moving object running along a fixed track, a video signal x.sub.o representing an original image 3A at a point in time of FIG. 2A is written to the video image memory 6 as a video signal y.sub.o representing a background picture 6A. Thereafter, as the video signal x.sub.n of the original picture is updated at, for example, a frame frequency of 30 Hz, the video signal y.sub.n representing the background image is also updated at the frame frequency of 30 Hz in accordance with equation (1) above. After a pre-determined period of time (e.g., after 4 seconds), the toy train 10 in the background image 6B corresponding to the video signal y.sub.n is partly erased. Finally (e.g., after 20 seconds), the toy train 10, which is a moving object in the background image 6C, is completely erased as shown in FIG. 2C.
Furthermore, the video signal z.sub.n is extracted from the video signal y.sub.n representing the background image shown in FIG. 2C and the video signal x.sub.n representing the original image, which is provided after a pre-determined period, i.e., 20 seconds as shown in FIG. 2A, according to the above-described equations (2) to (4). Consequently, a moving image (displayed on the color display monitor 9) 7A corresponding to the video signal Z.sub.n is represented as shown in FIG. 3. It will be seen in FIG. 3 that only the toy train 10 in the original image is extracted and displayed as a moving object.
The above-described prior-art method in which a background image is generated and the moving object is extracted by means of some sort of difference between the background image and a current image, however, can not avoid the following disadvantages:
(i) The background video image memory must have the same storage capacity as that of the current video image memory with the consequence that the image processing apparatus is expensive; PA1 (ii) The moving object can not be erased rapidly from the background image and the convergence is slow, so that it is impossible to detect a moving object immediately after a current image is input; and PA1 (iii) If a moving object in the original picture 3A is a complete moving object which shuttles between two completely separate positions 12A and 12B as shown in FIG. 4A, then a moving object 11 is displayed in the resultant moving image 7A in the original, complete form as shown in FIG. 4B. However, if the moving object in the current image 3A is a partially moved object which shuttles between two very close positions 14A and 14B, producing an overlapping portion 15 as shown in FIG. 5A, then a partly broken portion 13A occurs in the moving object 13 in the resultant moving picture 7A as shown in FIG. 5A.
Besides the above-described example of the prior art, various other methods have been proposed in the past to detect a moving object. However, each of them requires a background video image memory whose storage capacity is substantially the same as that of the original video image memory. Consequently none of them can avoid the shortcomings and disadvantages (i) and (ii) pointed out above.